package designpattern.struct.decorator;

public class Test {

    public static void main(String[] args) {
        Component component = new ComponentImpl();
        // 修饰，比如，加鸡蛋，加1块
        component = new Enhance1Decorator(component);
        component = new Enhance2Decorator(component);
        // 修饰后运行，将钱加在一起
        component.cost();
    }

}
